<?


	$pct->setParam('lang', $_GET['lang']);
  	$pct->setParam('task', $_GET['task']);
  	$pct->setParam('subtask', $_GET['subtask']);
  	$pct->setParam('param1', $_GET['param1']);
  	$pct->setParam('action', str_replace($CONFIG['AdminLinkNameDelim'], "_", $_GET['act']));

  	if(isBlank($pct->getParam('action')))
  	{
		$pct->setParam('action', 'home');
		$isHome = 'home';
		$tpl->assign('isHome', $isHome);
  	}
  	
  	if($pct->getParam('action') == 'articles')
  	{
  		$isArticle = 'yes';
  		$tpl->assign('isArticle', $isArticle);
  	}
  	
  	$action = $pct->getParam('action');
  	$tpl->assign('action', $action);
  	
  	$task = $pct->getParam('task');
  	$tpl->assign('task', $task);
  	
  	
	
	$ContentPageBlocks = array(
		'ArticleBanner' => array(
			'cache_lifetime' => 0,
		),		
		'HeaderBlock' => array(
			'cache_lifetime' => 0,
		),
		'HistorySection' => array(
			'cache_lifetime' => 0,
		),
		'MenuBlock' => array(
			'cache_lifetime' => 0,
		),
		'MenuLeftColumn' => array(
			'cache_lifetime' => 0,
		),
		'PartnerSlider' => array(
			'cache_lifetime' => 0,
		),
		'PartnerReview' => array(
			'cache_lifetime' => 600,
		),
		'ServiceInventor' => array(
			'cache_lifetime' => 0,
		),
		'OpportunityMain' => array(
			'cache_lifetime' => 0,
		),
		'OpportunityLeft' => array(
			'cache_lifetime' => 0,
		),
		'SocialPlugin' => array(
			'cache_lifetime' => 0,
		),
		'News' => array(
			'cache_lifetime' => 0,
		),
		'Publication' => array(
			'cache_lifetime' => 0,
		),
		'UsefulResource' => array(
			'cache_lifetime' => 0,
		),
		'SliderAdMain' => array(
			'cache_lifetime' => 0,
		),
		'SliderAdLeft' => array(
			'cache_lifetime' => 0,
		),
		'SliderHistoryMain' => array(
			'cache_lifetime' => 0,
		),
		'SliderHistoryLeft' => array(
			'cache_lifetime' => 0,
		),
		'SectionList' => array(
			'cache_lifetime' =>  0,
		),
		'ServiceSection' => array(
			'cache_lifetime' =>  0,
		),
		'Footer' => array(
			'cache_lifetime' => 0,
		),
		'VideoPresentation' => array(
			'cache_lifetime' => 0,
		),
		'Videos' => array(
			'cache_lifetime' => 0,
		),
	);
	
	$Page = new StdClass();
	$tpl->assign('Page', $Page);
	$Page->ContentPathArr = array(			
		array(
			'title' => $language['front']['mainPage'],
			'link' => '/',		
		)
	);	
	
	$Page->Title = $language['front']['mainPage'];
  	$Page->MetaTitle = "";
  	$Page->MetaKeywords = "";
  	$Page->MetaDescription = "";
  	
  	if(is_file(__CFG_PATH_CODE.$CONFIG['ModulesFolder'].'module.'.$pct->getParam('action').".php"))
  	{
  		include_once __CFG_PATH_CODE.$CONFIG['ModulesFolder'].'module.'.$pct->getParam('action').".php";
  	}
  	else
  	{
  		include_once __CFG_PATH_CODE.$CONFIG['ModulesFolder']."module.error.php";
  	}
  	
  	$pct->setCachingFor(0);

  	  
  	foreach($ContentPageBlocks as $blockName => $cashParams)
  	{
  		foreach($cashParams as $k => $value)
  		{
  			//$tpl->$k = $value;
  			//$pct->setCacheParams($k, $value);
  			$pct->setCachingFor($value);
  		}
  		include_once __CFG_PATH_CODE.$CONFIG['BlocksFolder'].'block.'.$blockName.'.php';
  	}
  	
  	
  	$pct->setCachingFor(0);
  	
  	
  	$pct->setBlock("content_path", $pct->fetch($CONFIG['ModulesFolder'].$CONFIG['BlocksFolder'].'block.content_path.tpl'));
  	
  	
  	// Block's on frontpage
  	$pct->setBlock("banner_top", $tpl->fetch($CONFIG['ModulesFolder'].$CONFIG['BlocksFolder'].'block.banner_top.tpl'));
  	
  	$pct->setBlock("banner_bottom_left", $tpl->fetch($CONFIG['ModulesFolder'].$CONFIG['BlocksFolder'].'block.banner_bottom_left.tpl'));
  	
  	$pct->setBlock("banner_bottom_right", $tpl->fetch($CONFIG['ModulesFolder'].$CONFIG['BlocksFolder'].'block.banner_bottom_right.tpl'));
  	
  	$pct->setBlock("banner_main_top", $tpl->fetch($CONFIG['ModulesFolder'].$CONFIG['BlocksFolder'].'block.banner_main_top.tpl'));
  	
  	$pct->setBlock("banner_main_bottom", $tpl->fetch($CONFIG['ModulesFolder'].$CONFIG['BlocksFolder'].'block.banner_main_bottom.tpl'));
  	
  	$pct->setBlock("banner_inside", $tpl->fetch($CONFIG['ModulesFolder'].$CONFIG['BlocksFolder'].'block.banner_inside.tpl'));
  	
  	$pct->setBlock("order_call_block", $tpl->fetch($CONFIG['ModulesFolder'].$CONFIG['BlocksFolder'].'block.order_call_block.tpl'));
  	 
  	$pct->setBlock("inventor_opp", $tpl->fetch($CONFIG['ModulesFolder'].$CONFIG['BlocksFolder'].'block.inventor_opp.tpl')); 
  	
  	$pct->setBlock("history_success_main", $tpl->fetch($CONFIG['ModulesFolder'].$CONFIG['BlocksFolder'].'block.history_success_main.tpl'));
  	
  	$pct->setBlock("partner_review", $tpl->fetch($CONFIG['ModulesFolder'].$CONFIG['BlocksFolder'].'block.partner_review.tpl'));
  	
  	$pct->setBlock("partner_block", $tpl->fetch($CONFIG['ModulesFolder'].$CONFIG['BlocksFolder'].'block.partner_block.tpl'));
  	
  	
  	

  	
  	$pct->setCachingFor(0);
  	$pct->setMainContent($pct->fetch($_BODY_SMARTY_TEMPLATE));


?>